#ifndef HAVE_TEXT2XML_LEXICON_H
#define HAVE_TEXT2XML_LEXICON_H

#include <glib.h>

#ifdef __cplusplus
extern "C" {
#endif
  typedef struct _Lexicon Lexicon;

  struct _Lexicon {
    GList* tokens;
  };

  /**
   * Returns a new lexicon.
   */
  Lexicon* lexicon_new(void);

  /**
   * Destroys the lexicon.
   */
  void lexicon_free(Lexicon* lexicon);

  /**
   * Appends a new item at the end of the specified lexicon.
   * Returns a pointer to the first element of the lexicon.
   */
  void lexicon_append(Lexicon* lexicon,
                      const char* name,
                      const char* pattern);
#ifdef __cplusplus
}
#endif                          /* __cplusplus */

#include "LexiconIter.h"

#endif                          /* HAVE_TEXT2XML_LEXICON_H */
